home *** CD-ROM | disk | FTP | other *** search
- Subject: v13i019: VN newsreader, 1/88 version, Part01/05
- Newsgroups: comp.sources.unix
- Sender: sources
- Approved: rsalz@uunet.UU.NET
-
- Submitted-by: Bob Mcqueer <amdahl!rtech!rtech!bobm@UUNET.UU.NET>
- Posting-number: Volume 13, Issue 19
- Archive-name: vn.jan.88/part01
-
- [ VN is a news reader which uses the same .newsrc file as readnews but
- displays and interacts differently. It is aimed at allowing you to
- rapidly scan a large number of newsgroups, looking for something you
- want to read. The major premise is that you will be interested in a
- small number of articles, but will be interested in keeping tabs on a
- large number of newsgroups which may contain something interesting
- from time to time. It also has the ability to unpackage digests.
- This version also includes a "virtual article" interface to allow
- you to work easily with NNTP, and other specialized services like,
- perhaps, mail. --r$ ]
-
- #! /bin/sh
- # This is a shell archive, meaning:
- # 1. Remove everything above the #! /bin/sh line.
- # 2. Save the resulting text in a file.
- # 3. Execute the file with /bin/sh (not csh) to create the files:
- # README
- # vn.man
- # Makefile
- export PATH; PATH=/bin:$PATH
- echo shar: extracting "'README'" '(3514 characters)'
- if test -f 'README'
- then
- echo shar: will not over-write existing file "'README'"
- else
- cat << \SHAR_EOF > 'README'
- Installation procedure steps, for standard version:
-
- 1) Edit file config.h and config_std.h, which define system dependent
- parameters. I have NOT ifdef'ed this file for likely changes for SYSV or
- anything like that. You probably can use these files untouched only if
- you are UCB with news installed in all the standard places. Even then,
- you may not like some of the defaults.
-
- 2) Edit the makefile, which has lots of comments describing how to set things
- for various systems. In order to remind you of this step, a "make" using
- the unedited makefile will simply say "PLEASE READ THE MAKEFILE".
-
- 3) make vn
-
- 4) put the executable where you want it. put the man page, vn.man
- where you want it. roff it with -man to print it out. If you made
- some configuration changes, or you are a SYSV installation, you may
- want to modify the manual a bit. It is written to reflect the actions in
- the config.h as distributed, and as used on UCB (it refers to job control).
- It also reflects the standard server interface.
-
- Notes:
-
- 1)
- If you modify the default printer or editor, this is
- their invocation, ufile being a tempfile name.
-
- "printer files 2>/dev/null"
- "editor ufile"
-
- 2)
-
- You may also be interested in the header file "tune.h" which contains
- some sizing / performance affecting parameters.
-
- SERVER INTERFACE:
-
- vn has a separable module which obtains actual news article information,
- and reading / updating user information. In the "standard" version, this
- module looks at the "active" file, persuses articles in the spool directories,
- and uses the user's .newsrc file. Through provision of a different set of
- server interface routines, vn may be used with other news storage /
- transmission mechanisms. The interface is described in the file server.doc.
-
- That module also controls the handling of followup posting & mail replies.
-
- RESOURCE USE:
-
- vn should look like people sitting in an editor once it is done with its
- reading phase. During the reading phase, the standard version is beating
- mercilessly on the spooling directory, reading file after file. Another
- server interface could be provided, which would depend on having a daemon
- do this work periodically, building a master file of title information for
- vn to access. Its reading phase would then be a "pause" rather than a
- "phase", with the penalty that you couldn't read anything until the daemon
- had gotten around to it.
-
- vn maintains a large temporary file containing the users page screens.
- Again, it should look a lot like the user is using an editor which has
- a temp file out there for its edit buffer. MAX_C in "tune.h" can be
- used to help control the size.
-
- Memory allocation: outside the server interface, vn will allocate a buffer
- for the current screen image, on the order of MAX_C times the number of
- lines on the users terminal. It will also allocate a NODE structure for
- each group, an array of pointers to same, and copies of the newsgroup name
- strings. This is all permanent storage for the entire session, hence never
- freed. There is also allocation of miscellaneous strings and regular
- expressions here and there, probably not significant. The regular
- expressions are freed after use. The "standard" server interface will
- allocate an array of character string pointers to newsgroup names, and
- possibly some regular expressions for option processing. It will free
- these after reading the .newsrc. It will also create and free string
- storage as articles are accessed, to hold information extracted from
- header lines.
- SHAR_EOF
- fi # end of overwriting check
- echo shar: extracting "'vn.man'" '(22744 characters)'
- if test -f 'vn.man'
- then
- echo shar: will not over-write existing file "'vn.man'"
- else
- cat << \SHAR_EOF > 'vn.man'
- .TH VN 1 2/1/85
- .UC
- .SH NAME
- vn - visual news reader
- .SH SYNOPSIS
- .I vn
- .SH DESCRIPTION
- .I Vn
- is a news reader which uses the same
- .B .newsrc
- file as
- .I readnews
- (1), but displays and interacts differently. It is aimed at allowing
- you to rapidly scan a large number of newsgroups, looking for something
- you want to read. The major premise is that you will be interested in a
- small number of articles, but will be interested in keeping tabs on a large
- number of newsgroups which may contain something interesting from time to time.
- It also has the ability to unpackage digests.
- .sp
- .I Vn
- supports the -n, -x and -t options of
- .I readnews
- (newsgroup, read all articles, and title). In addition, there
- is a -w (writer) option which works like -t, but is a search string to
- apply to the "From" header line rather than the subject. In the -n, -t
- and -w options, a leading ! on the string is taken to mean negation.
- The rest of the string is a regular expression for the -w and -t options.
- .sp
- For example:
- .sp
- -n net.dogs -w !fred -t [Bb]eagle
- .sp
- For articles in net.dogs about beagles written by somebody other
- than fred. Multiple -w -t options are treated as follows:
- .in +5
- .sp
- If the article satisfies any of the negations, you won't see it,
- regardless of the non-negated options.
- .sp
- Multiple -w options are logically "or'ed", as are multiple -t's.
- .sp
- If both -w and -t are present, the article is seen only if it satisfies
- at least one of the -w's and at least one of the -t's, ie. the results of the
- logical "or's" of the -t's and -w's are logically "anded".
- .sp
- .in -5
- The -n options allow the "all" convention, replacing ".all" by
- ".*" before using the regular expression calls. -n options are processed
- in order given, so that subsequent more specific -n's may partially
- undo the effect of previous "alls". Note that the -n option
- treatment is slightly different than the
- .I readnews
- treatment which says that "foo" implies "foo.all".
- .I Vn
- accepts this incompatibility to allow you an easier way of saying JUST "foo"
- without any of its subgroups.
- .sp
- Options may be given on the command line, in which case they will
- supersede those given in the
- .B .newsrc
- file. For command line -n options, the "!" unsubscriptions in
- .B .newsrc
- are also ignored. This allows you to override all subscription information
- by command line specification. If you use an -S option on the command line,
- the "!" unsubscriptions will still be used. -S is meaningless in the
- .B .newsrc
- file.
- .sp
- There are two more options specific to
- .I vn:
- the -%, -U. The -% option initially gives you the results of a "%"
- command, rather than the page for the first newsgroup (see below).
- This allows you to see what newsgroups are available before viewing any.
- The -U option says that when your
- .B .newsrc
- file is updated via answering "yes" to the update query on
- exit or using control-W, newsgroups marked with "!" are to be updated too.
- Normally, these groups are left alone, ie. updated only to the number that
- was already in your
- .B .newsrc,
- or the lowest article number still around.
- You may get flooded should you decide to resubscribe.
- If you don't like this treatment, use -U. Then, control-W and "yes" to
- the update on exit will update your unsubscribed newsgroups to the most
- recent article.
- .sp
- When
- .I vn
- is invoked,
- there will be a pause (with an explanatory "reading" message and
- a series of newsgroups) while vn reads the news. The newsgroups listed
- are ones articles are actually being found in.
- The length of the pause depends
- on how much news there is. If there is a lot,
- it may take a long time to get through the reading phase.
- .sp
- Once the reading phase is over, interaction is rapid.
- If
- .I vn
- is backgrounded, it suppresses the "reading" output, so
- that it will not halt on tty output until it is ready to begin showing
- articles.
- .sp
- .I Vn
- may show you a list of newsgroups which were not mentioned in the
- .B .newsrc
- file. Records for these newsgroups will be added, whether
- they were scanned for articles or not. The first time
- .I vn
- is used, the list may be quite long and scroll off the screen.
- Thereafter, there should only be a list when new newsgroups are
- created. This display serves to let you know of their existence,
- or of something happening to your
- .B .newsrc
- file.
- .sp
- The basic display is a "page" which shows a newsgroup and a list of
- titles, number of
- lines, and authors for new articles.
- Articles which have been updated in the
- .B .newsrc
- file are flagged with an underscore preceding the article number.
- You also have the ability to "mark" articles for the duration of a session,
- shown with an asterisk (col. 1 and 2 are reserved for asterisk and
- underscore respectively -
- in normal usage they will be blank, so that the casual user will probably
- be unaware of their use until marking and updating are invoked)
- .sp
- There is a help menu to go with this page.
- You may read articles, save them, send them to the printer, either by cursor
- position, the whole page, or in specified sets. Sets are specified either
- as a set of article numbers, a regular expression to match the subject /
- author / number of lines data on, or an asterisk to indicate the choice
- of a set of previously marked articles. Any of these methods also
- accept a leading "!" to indicate negation.
- .sp
- By default, when you read articles only a couple of the dozen or so
- header lines are
- shown. There is an option to allow you to see all the
- header lines when you read articles. The command controlling this toggles
- between the two states.
- .sp
- A similar toggle is used to support ROT13.
- .sp
- .I Vn
- is capable of manipulating digests. The "d" command unpacks a digest,
- and presents you with a page showing the unpacked articles, which can
- be accessed as for articles on normal newsgroup pages.
- When you leave the digest page(s), you reenter the normal flow of newsgroups.
- Digests can also be read as normal articles, of course.
- .sp
- Order of pages is determined by
- order of groups in
- .B .newsrc.
- Newsgroups which are not
- mentioned in
- .B .newsrc
- will be added, as mentioned previously, and tacked onto the end.
- Lines corresponding to non-existent newsgroups will be deleted.
- You will probably want to run
- .I vn
- once, then edit
- .B .newsrc
- to the desired order of presentation.
- .sp
- Updating the data for
- .B .newsrc
- is under user control. If you do
- no "W", "w", "^w", o or O commands, no updating takes place, and you'll see the
- articles again the next time you read news.
- If you quit without updating, you will be prompted to make sure you
- don't want to do so. The word "yes" will actually be pretyped for you
- on the prompt. You may erase it and enter "no" to avoid the update.
- Earlier versions simply prompted with no pre-typed answer, and
- there were requests "yes" the default answer rather than "no". This
- honors that request, while underscoring what is going on. This treatment
- is site-configurable, actually.
- .sp
- Note that "updating what you've seen" to
- .I vn
- means that you've seen the page presentation, not that you've read the
- article. This is consistent with the overall assumption that you don't
- want to read most of what you are presented with.
- .sp
- Breaks result in a "really quit?" query, so you can recover from noisy
- lines and prompts for commands you didn't really mean. If you answer no,
- you are simply jumped back to the page. Breaks while in the midst of scrolling
- out an article you are reading jump you to the end of the article to stop
- the output.
- .sp
- Commands are single character (no return key required), except that
- they may be preceded with numeric characters, which may have
- some effect on their actions. Commands which require further input
- cause prompts for the information, this input being
- terminated by return. For prompted input, the erase and kill keys
- work.
- .sp
- .ce 1
- Command Menu For Page:
- .sp
- .nf
- [...] = effect of optional number preceding command
- pipes are specified by filenames beginning with |
- articles specified as a list of numbers, title search string, or
- * to specify marked articles. ! may be used to negate any
-
- q - quit
- k - (or up arrow) move up [number of lines]
- j - (or down arrow) move down [number of lines]
- <back sp> - (or left arrow) previous page [number of pages]
- <return> - (or right arrow) next page [number of pages]
- d - unpack digest
- H - top of page
- L - bottom of page
- G - bottom of page (alternate L)
- M - middle of page
- d - unpack digest
- r - read article [number of articles]
- <space> - read article (alternate 'r')
- R - read all articles on page
- control-r - specify articles to read
- s - save or pipe article [number of articles]
- S - save or pipe all articles on page
- control-s - specify articles to save
- control-t - specify articles to save (alternate ctl-s)
- p - print article [number of articles]
- P - print all article on page
- control-p - specify articles to print
- w - update .newsrc status to cursor
- W - update .newsrc status for whole newsgroup
- control-w - update .newsrc status for all pages displayed
- o - recover original .newsrc status for newsgroup
- O - recover all original .newsrc status
- # - display count of groups and pages - shown and total
- % - list newsgroups with new article, updated counts
- n - specify newsgroup to display and/or resubscribe to
- u - unsubscribe from group
- x - mark/unmark article [number of articles]
- * - mark/unmark article [number of articles]
- X - erase marks on articles
- h - toggle flag for display of headers when reading
- z - toggle rotation for reading
- <formfeed> - redraw screen
- ! - escape to UNIX to execute a command
- " - show vn version
- ? - show this help menu
- .fi
- .sp
- When you read articles, there is another help menu, for advancing through
- the articles, replying, posting followups, and saving the
- articles. Breaks may be used to
- stop the output of an article if you decide that you didn't really
- want to read it. You can jump from the reading portion back to either
- page you came from or the NEXT page.
- .sp
- You can cause the article reading interface to repaint the screen rather
- than scroll, if that is more efficient for your display. See description
- of the MORE variable, below.
- .sp
- For replying and posting followups, you will be thrown into an editor
- to create the reply or article.
- The article will be included in the file you are editing, marked with
- "> "'s for excerpting in your reply or followup. After you exit the
- editor, you are prompted to make sure you still want to post or reply,
- so you can abort.
- .sp
- For followups, your article is appended to "author_copy" for future
- reference.
- .sp
- Header lines for the mailer / news poster are present in the file
- you are editing to allow you to modify them. Remember to leave a blank
- line between the header lines and your text. It may be OK if you
- don't, but why tempt fate.
- .sp
- The editor is determined by your EDITOR or VNEDITOR variable, as for
- .I postnews. (see section on ENVIRONMENT VARIABLES).
- If EDITOR is not set, you get
- .I vi,
- or the default determined at your site.
- .sp
- .ce 1
- Reading menu:
- .sp
- .nf
- n - next article, if any
- q - quit reading articles, if any more to read
- Q - quit reading, and turn to next page of articles
- r - rewind article to beginning
- <return> - next line
- / - search for a pattern in the article
- m - send mail to author of article
- f - post followup to article
- s - save article in a file
- p - send article to the printer
- ? - see this help menu
- z - toggle rotation flag
- h - toggle header suppression flag
-
- anything else to continue normal reading
- .fi
- .sp
- When articles are saved from anywhere, a few special conventions apply.
- .sp
- If the name begins with "|", you are specifying
- a pipe to feed the article(s) to, rather than a file. No other interpretation
- is done in this case.
- .sp
- If you specify a name not beginning with "/", the article will be saved
- with reference to your original directory, or with reference to the VNSAVE
- variable (see below).
- .sp
- If you embed a "%d" in the name, that
- will be replaced with the article number, or the first number in a list
- of articles.
- .sp
- If you prepend "w:" to the
- name, you can force an overwrite instead of an append. The colon prefix
- may be used to open the file with any mode you please, actually. If you
- really WANT a colon in the name, specify "a:" ahead of it. The colon
- prefix is stripped off before any other filename interpretation.
- .sp
- Both the VNSAVE variable and the save name may use a leading "~" to
- indicate the user's home or "~name" for another user's home. It is assumed
- that a slash will separate the tilde expression from the rest of VNSAVE, or
- the rest of the file name if there are further directories.
- .sp
- When you are prompted for a savefile name, the last none-pipe one you used
- is presented, so you may use your erase/kill keys to edit it.
- .sp
- Old search strings / pattern match strings are also presented for edit in the
- same manner.
- .sp
- If you don't like the choice of command keys, you
- may change them (default choices - basic control in article
- reader is ala "more" of course, the "j" and "k" on the page presentation
- are "vi" convention, other page commands are somewhat "readnews" compatible).
- If you have a file named
- .B .vnkey
- in your home directory this file will be read in order to obtain keystroke
- translation. The format is simple:
- .sp
- Each line begins with R or P indicating translation for the reader interaction,
- or the page interaction (r and p accepted also). Following the R or P is
- a character, followed by an "=", followed by another character. The character
- on the left hand side of the equals sign is what you wish to input, and the
- character on the right hand side of the equals sign is what you wish to
- translate it to. No embedded spaces.
- Lines not beginning with the proper characters are simply
- ignored, as are characters following the translated character. Eg:
- .sp
- .in +5
- Pd=j
- .br
- Pu=k
- .in -5
- .sp
- uses "u" and "d" instead of "j" and "k" on the page layout (presumably,
- you are also going to translate something else to "u" and "d" for the
- unsubscribe and digest commands). If you translate keys, it is up to you
- to see that all commands can still be reached, and that former command keys
- which are no longer used are mapped to something meaningless. In particular,
- you are going to have difficulties if you make it impossible to input "q". The
- help menus will show the "new" keys, and bad mappings should show up as
- multiple definitions for the same key, or alternate mappings not showing
- up on the help menu.
- .sp
- Mapping the "=" key via "==" works. Any keys not mentioned in the file
- are translated to themselves.
- .sp
- Control keys are given as DECIMAL numbers with no backslashes or anything.
- The decimal number is the ASCII code for the character, eg:
- .sp
- .in +5
- P24=12
- .br
- P12=?
- .in -5
- uses "control-x" for the "control-l (formfeed)" refresh key, and maps the
- control-l to a "?". BTW, mapping all undefined keys to "?" will mean that you
- automatically get the help display for any illegal key, should you wish for
- such a thing. The LAST one mapped will determine what key is given in
- the "? for help" lines, and the help display itself.
- Remembering that control-A through
- control-Z are ASCII codes 1 through 26 and delete = 127 may keep you from
- having to consult an ASCII table. Remember also that some controls, such
- as control- C, Z, S or Q may be caught by the operating system for signal
- generation or terminal control, and are thus unavailable.
- .sp
- Because of arrow keys and the ability to prefix commands with counts,
- numeric characters and the escape key may not be used for page commands.
- Attempts to use them will simply do nothing.
- .sp
- Control keys are not available for the reader, except for newline,
- backspace, and tab. The reason controls are filtered here has to do
- with nasty problems involving terminal mode switches on some systems,
- specifically a UTS frontend early versions were being used on.
- .sp
- In either interaction, "return" and "linefeed" are mapped to the "newline"
- character at a level below the translation. If you don't know the
- ASCII for the "newline" char, it is recommended that you map both
- ASCII 10 and 13 if you wish to map "return" to something.
- .SH FILES
- .TP 24
- /usr/tmp/*
- One temporary file created by
- .I tmpnam
- (3), and immediately unlinked,
- remains open in update mode for duration of session.
- Disk space freed by system close of file descriptor at exit.
- Can be large, as this file contains the "page" displays.
- Temporary files also created by
- .I tmpnam
- (3) for mailing replies, posting followups and creating digest "articles".
- .TP 24
- (login directory)/.newsrc
- news status file. Updated following session. See NEWSRC environment variable.
- .TP 24
- (login directory)/author_copy
- A copy of all articles posted using the followup command will be appended
- to this file in /bin/mail format. See CCFILE environment variable.
- .TP 24
- (login directory)/.vnkey
- Keystroke mapping file for changing command characters.
- .TP 24
- (login directory)/*.vnXXXXXX
- One temporary file created by
- .I tmpnam
- (3) while updating the .newsrc file. If the update fails, you are informed,
- and this file
- may be used to recover the last update. Unlinked following successful update.
- .TP 24
- (spool directory)/*
- spooling directories containing articles.
- .TP 24
- /usr/lib/news/active
- active newsgroup list.
- .SH "ENVIRONMENT VARIABLES"
- For all variables which do not begin with "VN", vn will accept an override
- by setting a variable VN<name> which will be preferred. For instance
- setting VNEDITOR allows you to use a special editor for vn without affecting
- use of that variable by your shell, setting VNPS1 takes care of your
- normal UNIX prompt having multiple lines, or setting VNNEWSRC allows you to
- use vn without disturbing your .newsrc for other readers.
- .TP 24
- VNSAVE
- used as a directory to place saved articles in. If it does not begin
- with "/", it will be taken with respect to the users home directory. If
- it ends with "/%s", a separate directory will be created for each
- newsgroup.
- .TP 24
- PS1
- used to present prompt string for command on unix escape.
- defaults to "$ "
- .TP 24
- EDITOR
- editor used for mailing replies and posting followups.
- defaults to "ed".
- .TP 24
- POSTER
- posting program for followups. defaults to "inews -h".
- .TP 24
- MAILER
- used when mailing replies. defaults to "sendmail -t".
- .TP 24
- PRINTER
- program used with the print commands for sending articles to
- the printer. defaults to "lpr".
- .TP 24
- NEWSRC
- if set, can be used to override the choice of ".newsrc" as the
- name for the status file. Name will still be used relative to
- the login directory, unless it begins with "/".
- .TP 24
- MORE
- if set to "-c", will cause the article reading display to clear and
- repaint, rather than relying on scrolling. For some environments,
- notably Sun, this is faster. This also causes some minor display
- modifications which you may prefer.
- .TP 24
- CCFILE
- if set, overrides the choice of "author_copy" as the name of the
- file to CC all articles posted with the followup command. Name
- will still be used relative to the login directory, unless it begins
- with "/".
- .TP 24
- VNKEY
- if set, overrides the choice of ".vnkey" as the name of the
- file to map keys from. Name
- will still be used relative to the login directory, unless it begins
- with "/".
- .SH DIAGNOSTICS
- user error messages. self explanatory.
- .SH AUTHOR
- R. L. McQueer
- .SH BUGS
- Note that
- .I readnews
- will rearrange the order of
- .B .newsrc.
- If you
- interleave use of it with
- .I vn,
- order selection gets hosed.
- .sp
- If you've really taken advantage of the ability of readnews to skip
- articles in the middle of the spooling numbers, be warned that
- .I vn
- doesn't have it, and will
- assume you've read the articles in the middle.
- .sp
- If the
- .B .newsrc
- file indicates that you've read articles in a newsgroup with a higher
- number than the current spooling number for that newsgroup,
- .I vn
- will show you up to 60 old articles. This is intended for recovery in
- cases where article spooling has been reset, or to avoid missing articles
- because you just changed machines and didn't bother to edit your
- .B .newsrc
- file. Rather than miss stuff, you'll see some old stuff again. During
- the reading phase, a warning message is printed that this is happening.
- .sp
- Sometimes a "break" during reading an article will not only halt the
- article but suppress the prompt. A command character will work anyway.
- .sp
- If a prompt to be displayed on the dialogue line
- contains non-printing sequences, stuff on the
- line may not get erased when you are prompted, because
- .I vn
- thinks the string is long enough to overprint its current contents.
- This usually comes up when you have escape sequences in your UNIX
- prompt, and do a "!" command.
- The "overprint" check is made to save a clear-line sequence (kludged in
- by overprinting to the end with blanks if the terminal doesn't
- have one - annoying at 1200 baud).
- .sp
- Output during the reading phase which was suppressed by backgrounding
- .I vn
- does not get started by foregrounding it again without doing a
- control-z and a second foreground (it doesn't figure out its background /
- foreground status on each output - only on startup and while handling
- the SIGTSTP signal). Actually, this results in a method for having
- .I vn
- do its reading phase silently in the foreground without redirecting
- output, should such a thing be desired.
- .sp
- Very many -w or -t options cause SLOW reading phases. It is recommended
- that these be used only when reading a few specific groups.
- .sp
- Digest extraction will split a single article into several if it contains
- embedded ---- lines, the normal separator between articles in digests.
- They will all have identical titles.
- Digest extraction may not work with human built digests which don't
- use the expected syntax for joining articles. mod.computers.ibm-pc
- and mod.computers.mac were used as models for the feature.
- .sp
- The data given by the % command represents the difference between the
- last article number you've updated to in a newsgroup and the high
- article number. This may be significantly greater than the number of
- actual articles for a newsgroup you haven't been reading, and for
- newsgroups that have had a lot of articles filtered out of them using
- the -w and -t options. The numbers given for menu selection in the
- % command are the order numbers from the .newsrc, and have gaps for
- unsubscribed newsgroups.
- .sp
- The key mapping capability doesn't handle function keys. Because of the
- use of controls as commands, terminals whose arrow keys echo something
- other than a sequence beginning with escape can't use arrow keys. For
- these terminals, a warning message is printed during the reading phase.
- SHAR_EOF
- fi # end of overwriting check
- echo shar: extracting "'Makefile'" '(2963 characters)'
- if test -f 'Makefile'
- then
- echo shar: will not over-write existing file "'Makefile'"
- else
- cat << \SHAR_EOF > 'Makefile'
- # CFLAGS:
- # set -DJOBCONTROL if you have job control (BSD).
- # set -DSYSV -Dindex=strchr -Drindex=strrchr on Sytem V systems
- # set -Dregfree=free if you DON'T include reg.o (SYSV + some BSD)
- #
- # JOBCONTROL could be done as #ifndef SYSV, I suppose, but this clearly
- # marks that particular difference.
- #
- # LIBS:
- # should point to any extra libraries needed, such as termcap. You
- # may want to change this to use the curses termcap cover. If you need
- # to pull in another library to get regex / regcmp or strtok on non-SYSV
- # systems, you may want to put that here
- #
- # EXTRAOBJS:
- # may be used to include tmpnam.o, strtok.o, reg.o in the list.
- #
- # These objects implement SYSV utilities for BSD machines.
- #
- # strtok.o implements strtok() / strpbrk(). reg.o implements regex()/regcmp()
- # on top of the BSD regular expression library (regex() allows multiple
- # regular expressions). tmpnam.o implements tmpnam() of course.
- #
- # If you have them, use your own regex/regcmp, because:
- #
- # i) They should be faster than the reg.c code, which
- # recompiles the "current" ucb string every time you
- # switch regular expressions.
- #
- # ii) I briefly checked out reg.c once, and it seemed to
- # work. Our system has the "real" calls available, so I
- # run with those. reg.c hasn't been used much by me, although
- # I've had nobody tell me it doesn't work.
- #
- # if you DON'T include reg.o, be sure you set -Dregfree=free in CFLAGS.
- #
- # As with regex, if you have a system strtok(), it is likely more efficient -
- # string routines will often be done in assembler on a given machine.
- #
- # Even if you have it, you can use tmpnam.o anyhow. This version will tailor
- # the temp file name to vnXXXXXX, instead of a generic tmpXXXXXX.
- #
- # "vanilla" BSD:
- #LIBS = -ltermcap
- #EXTRAOBJS = tmpnam.o strtok.o reg.o
- #CFLAGS = -O -DJOBCONTROL
- #
- # "vanilla" SYSV:
- #LIBS = -ltermcap
- #EXTRAOBJS = tmpnam.o
- #CFLAGS = -O -DSYSV -Dregfree=free -Dindex=strchr -Drindex=strrchr
- #
- # BSD with strtok() / regex(), such as ULTRIX. These are the rules
- # used for our installation (rtech is a microvax running ULTRIX):
- #LIBS = -ltermcap
- #EXTRAOBJS = tmpnam.o
- #CFLAGS = -O -DJOBCONTROL -Dregfree=free
-
- # SERVEROBJS defines the object(s) for the vns_xxxx "server" interface.
- #
- # std.o is the version for "standard" news, making use of the
- # users .newsrc file, and resident articles / active file.
- #
- SERVEROBJS = std.o
-
- # normal vn objects
- #
- VNOBJS= hash.o envir_set.o pagefile.o reader.o storage.o sig_set.o term_set.o tty_set.o userlist.o vn.o vnglob.o digest.o strings.o session.o printex.o getch.o help.o newdisp.o stat.o svart.o
-
- # This is to force you to read the makefile. Once you have, comment this rule,
- # and uncomment the "real" rule. At the minimum, you will also have to
- # uncomment one of the three sets of LIBS / EXTRAOBJS & CFLAGS definitions
- # above.
- #
- vn:
- @echo "PLEASE READ THE MAKEFILE"
- #vn: $(VNOBJS) $(EXTRAOBJS) $(SERVEROBJS)
- # cc -o vn $(VNOBJS) $(EXTRAOBJS) $(SERVEROBJS) $(LIBS)
- SHAR_EOF
- fi # end of overwriting check
- # End of shell archive
- exit 0
-